package advanced.design_mode.decoratemode;

//具体装饰类(对饮品的装饰,通过重写方法,其中实现改装饰器特征的东西)
//继承了装饰器抽象类
public class Sugar extends Decorate {

    public Sugar(Drink drink) {
        super(drink);
    }

    @Override
    public double cost() {
        return super.cost() + 40;
    }

    @Override
    public String info() {
        return super.info() + "加入了糖";
    }

    public void degree() {
        System.out.println("可是设定糖度");
    }
}
